<?php
/***
 * define the global constant for app
 */
defined ( 'APPDATA_PATH' ) or define ( 'APPDATA_PATH', APP_PATH . 'appdata' . DS ); // 运行时数据目录
defined ( 'TMP_PATH' ) or define ( 'TMP_PATH', APPDATA_PATH . 'tmp' . DS ); // temporary  directory


define ( 'LOCALE_PATH', APP_PATH . 'locale' . DS ); // locale directory
defined ( 'MODEL_PATH' ) or define ( 'MODEL_PATH', APP_PATH . 'models' . DS ); // models directory


define ( 'VENDOR_PATH', APP_PATH . 'vendors' . DS ); // vendors directory
define ( 'PLUGIN_PATH', APP_PATH . 'plugins' . DS ); // plugins directory
define ( 'WWW_PLUGIN_PATH', WWW_ROOT . 'plugins' . DS ); // WWW PLUGIN DIRECTORY
define ( 'CORE_PLUGIN_PATH', NUTZP_PATH . 'plugins' . DS );
defined ( 'MODULE_PATH' ) or define ( 'MODULE_PATH', APP_PATH . 'modules' . DS ); // the modules off webapp
defined ( 'TEMPLATE_DIR' ) or define ( "TEMPLATE_DIR", "templates" );
define ( 'TEMPLATE_PATH', WWW_ROOT . TEMPLATE_DIR . DS );
defined ( 'CONTROLLER_DIR' ) or define ( 'CONTROLLER_DIR', 'controllers' );
defined ( 'VIEW_DIR' ) or define ( 'VIEW_DIR', 'views' );
defined ( 'VALIDATE_DIR' ) or define ( 'VALIDATE_DIR', 'validates' );

// exports kernel paths
$__exports ['_core'] = NUTZP_PATH . 'core';
$__exports [] = $__exports ['_core'] . DS . 'view';
$__exports [] = $__exports ['_core'] . DS . 'controller';
$__exports ['_model'] = $__exports ['_core'] . DS . 'model';
$__exports ['_datasources'] = $__exports ['_model'] . DS . 'datasources';
$__exports [] = $__exports ['_datasources'] . DS . 'mysql';
$__exports [] = $__exports ['_datasources'] . DS . 'postgresql';
$__exports [] = $__exports ['_datasources'] . DS . 'sqlite';
$__exports [] = APP_PATH . 'models';
$__exports [] = APP_PATH . 'plugins';
$__exports [] = APP_PATH . 'vendors';

$__exports ['_vendors'] = NUTZP_PATH . 'vendors';
$__exports [] = $__exports ['_vendors'] . DS . 'filesystem';
$__exports [] = $__exports ['_vendors'] . DS . 'smarty';

function the_plugin_url($resource) {
	return BASE_URL . 'plugins/' . ltrim ( $resource, '/' );
}
//end of paths.php